Skip to content

Switch pnpm#2188

Merged
simo6529 merged 10 commits intomainfrom
switch-pnpm
Apr 1, 2026
Merged

Switch pnpm#2188
simo6529 merged 10 commits intomainfrom
switch-pnpm

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Mar 31, 2026

Summary by CodeRabbit

  • Chores

    • Migrated project tooling from npm to pnpm v10.33.0 across CI, scripts, dev tooling, and deploy flows; added workspace and preinstall validation; replaced install/build/audit commands and routed PM2 via pnpm exec; removed obsolete npm-specific config.
  • Quality

    • Tightened package/lint rules, added dependency overrides/engines, and ignored pm2 in deadcode checks; updated dev/setup scripts and dev-server launcher to use pnpm.
  • Documentation

    • Updated README and developer guides/examples to reflect pnpm usage and workflow changes; added gitignore entry for local test artifacts.

Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 31, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bf377648-cd5f-4298-a385-fc4a1c828bf2

📥 Commits

Reviewing files that changed from the base of the PR and between dcdcea4 and a98bbe3.

📒 Files selected for processing (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

📝 Walkthrough

Walkthrough

Repository-wide migration from npm to pnpm v10.33.0: package manager, CI/CD, Elastic Beanstalk provisioning, developer scripts, workspace config, build/tooling scripts, and documentation updated to require and use pnpm.

Changes

Cohort / File(s) Summary
Elastic Beanstalk provisioning
\.ebextensions/npm.config, \.ebextensions/pnpm.config
Removed npm container command; added pnpm installer and PNPM_HOME/PATH setup plus pnpm install --frozen-lockfile container commands.
Manifest & workspace
package.json, pnpm-workspace.yaml, \.npmrc, \.npmpackagejsonlintrc.json
Added packageManager: pnpm@10.33.0, engines, preinstall ensure-pnpm script, moved/added pnpm overrides and workspace; removed .npmrc; tightened package-json-lint rules.
CI/CD workflow
.github/workflows/build-upload-deploy-prod.yml
Switched GitHub Actions from npm to pnpm (pnpm/action-setup v10.33.0, cache: pnpm), replaced npm ci/npm run/npm audit with pnpm install --frozen-lockfile/pnpm run/pnpm audit.
Developer setup & PM2 orchestration
dev-setup/run-setup.sh, dev-setup/run-reset.sh, dev-setup/README.md
Added PNPM env helpers and ensure_pnpm; wrappers to run PM2 via pnpm exec; removed global PM2 install path; narrowed Node prereq; switched installs/builds to pnpm.
Scripts & tooling
scripts/ensure-pnpm.cjs, scripts/quality.js, scripts/dev-open.cjs, scripts/staging.sh, scripts/worktree/...
Added ensure-pnpm script; replaced npm/npx invocations with pnpm/pnpm exec across helper scripts, dev tooling, staging, and worktree scripts.
Package exceptions & deps
knip.jsonc, package.json (devDeps)
Added pm2 to Knip ignore list and to devDependencies; updated depcheck ignores and pnpm overrides.
Tests & config
playwright.config.ts, .gitignore
Switched webServer.command to pnpm dev; added /.playwright-mcp/ to .gitignore; consistent string quoting updates.
Docs & examples
README.md, dev-setup/README.md, standalone/.../README.md, standalone/.../export-mint-page.cjs
Replaced npm command examples with pnpm equivalents and updated PM2 examples to use pnpm exec pm2.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer
  participant Repo as Repository (preinstall)
  participant CI as GitHub Actions
  participant EB as Elastic Beanstalk
  participant Runtime as App Runtime / PM2

  Dev->>Repo: git clone / pnpm install
  Repo->>Repo: scripts/ensure-pnpm.cjs validates pnpm@10.33.0
  Dev->>Runtime: run PM2 via pnpm exec (run-setup.sh wrappers)
  CI->>CI: setup-node + pnpm/action-setup@v10.33.0
  CI->>CI: pnpm install --frozen-lockfile, pnpm run build, pnpm audit
  CI->>EB: deploy artifacts
  EB->>EB: container_commands install pnpm and run pnpm install
  EB->>Runtime: start app (uses repo-managed pnpm for PM2)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Deps lock #2186: Modifies CI and package-management files similar to this pnpm migration.
  • lock versions #2184: Makes conflicting/overlapping changes to .npmrc and package-manager settings (npm ↔ pnpm).

Suggested reviewers

  • prxt6529
  • ragnep

Poem

🐰 I hopped from npm to pnpm's glade,

pinned the version and scripts were swayed.
Lockfiles frozen, commands aligned,
PM2 now runs through the repo's mind.
A tidy hop — the builds behave.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Switch pnpm' directly and concisely describes the main objective of the pull request, which is switching the project from npm to pnpm across all build, deployment, and development tooling.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch switch-pnpm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread .github/workflows/build-upload-deploy-prod.yml Fixed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 543ab0cb31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/build-upload-deploy-prod.yml Outdated
Comment thread dev-setup/run-reset.sh Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

♻️ Duplicate comments (1)
.playwright-mcp/page-2026-03-31T13-16-07-416Z.yml (1)

1-4: ⚠️ Potential issue | 🟡 Minor

Verify if this auto-generated snapshot file should be included in the PR.

This is another timestamped Playwright MCP snapshot file (created ~19 seconds after the first one) that captures a UI state with a "Open Next.js Dev Tools" button and an alert. Like the previous snapshot file, it appears unrelated to the pnpm migration objectives and may have been accidentally committed during local development.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.playwright-mcp/page-2026-03-31T13-16-07-416Z.yml around lines 1 - 4, This
timestamped Playwright MCP snapshot (containing the "generic [active]" snapshot
with a button labeled "Open Next.js Dev Tools" and an alert) appears to be an
accidental, unrelated test artifact and should be removed from the PR; delete
this snapshot file from the branch (or revert the commit that added it), stop
committing auto-generated Playwright MCP snapshots, and add the pattern for
these timestamped .yml snapshots to your repository ignore rules (e.g., update
.gitignore) so future MCP snapshot files are not tracked.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.ebextensions/pnpm.config:
- Around line 3-5: The install script hard-codes PNPM_VERSION=10.15.1 which
conflicts with the project's pinned pnpm@10.33.0; update the install command
string that contains "curl -fsSL https://get.pnpm.io/install.sh | env
PNPM_VERSION=10.15.1 SHELL=/bin/bash bash -" to use PNPM_VERSION=10.33.0 so
Elastic Beanstalk installs the same pnpm version the project declares, leaving
the subsequent export/PATH and the "pnpm install --frozen-lockfile" step
unchanged.

In @.github/workflows/build-upload-deploy-prod.yml:
- Around line 37-40: Update the pnpm setup step in the CI workflow to use the
project's pinned pnpm version: change the version value passed to the
pnpm/action-setup@v4 step from "10.15.1" to "10.33.0" so CI uses the same pnpm
release as package.json and avoids lockfile drift; locate the uses:
pnpm/action-setup@v4 block and update the version field accordingly.
- Line 37: Replace the mutable reference uses: pnpm/action-setup@v4 with an
immutable commit SHA; either upgrade to the v5 release and pin to its
full-length commit SHA (and add a trailing comment like "# v5.0.0") or pin the
existing v4 to its full-length commit SHA (and comment "# v4.x.x"), ensuring the
uses statement uses the commit SHA instead of the short tag to eliminate
supply-chain risk.

In @.playwright-mcp/page-2026-03-31T13-15-48-291Z.yml:
- Line 1: Remove the autogenerated test artifact named
page-2026-03-31T13-15-48-291Z.yml from the commit and stop it being tracked;
delete that file from the repo and create a .gitignore entry for the
.playwright-mcp/ directory (or add the specific filename) so future snapshots
aren’t committed, then stage/commit the removal and .gitignore change; verify no
tests or configs reference this snapshot before pushing.

In `@dev-setup/run-setup.sh`:
- Around line 295-299: Update the misleading comment that says "Removing
existing node_modules and lockfile for a clean install…" to accurately reflect
the behavior: remove only node_modules and preserve the lockfile for the pnpm
install --frozen-lockfile step. Locate the conditional that checks [[ -d
"$REPO_ROOT/node_modules" ]] and change the color yellow message to something
like "Removing existing node_modules for a clean install (lockfile preserved)…"
so it references REPO_ROOT/node_modules and the subsequent pnpm install
--frozen-lockfile command.

In `@package.json`:
- Around line 5-9: Add a top-level pnpm.overrides section to package.json that
mirrors the overrides currently only present in pnpm-lock.yaml so they persist
across lockfile regen; specifically add a pnpm.overrides object containing the
keys '@emoji-mart/react>react': '19.2.4', '@emoji-mart/react>react-dom':
'19.2.4', 'eslint-plugin-react-hooks': '7.0.0', 'react-toggle>react': '19.2.4',
'react-toggle>react-dom': '19.2.4', and 'serialize-javascript': '7.0.4' (keep
the exact package spec strings as in the lockfile) under the existing
package.json metadata next to packageManager/engines so pnpm will use these
overrides as the source of truth.

In `@scripts/ensure-pnpm.cjs`:
- Around line 1-13: The repository has mismatched pnpm versions: ensure-pnpm.cjs
defines requiredPackageManager ("pnpm@10.33.0") and the packageManager
field/docs use 10.33.0, while .ebextensions/pnpm.config installs
PNPM_VERSION=10.15.1; update the deployment config to use 10.33.0 (or centralize
the version into one source of truth referenced by both deployment and
ensure-pnpm.cjs) so the requiredPackageManager value and the EB PNPM_VERSION are
identical and the corepack/use instructions remain correct.

---

Duplicate comments:
In @.playwright-mcp/page-2026-03-31T13-16-07-416Z.yml:
- Around line 1-4: This timestamped Playwright MCP snapshot (containing the
"generic [active]" snapshot with a button labeled "Open Next.js Dev Tools" and
an alert) appears to be an accidental, unrelated test artifact and should be
removed from the PR; delete this snapshot file from the branch (or revert the
commit that added it), stop committing auto-generated Playwright MCP snapshots,
and add the pattern for these timestamped .yml snapshots to your repository
ignore rules (e.g., update .gitignore) so future MCP snapshot files are not
tracked.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 78139781-73ae-491e-b442-2f4e45b9494e

📥 Commits

Reviewing files that changed from the base of the PR and between 8d32241 and 543ab0c.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (23)
  • .ebextensions/npm.config
  • .ebextensions/pnpm.config
  • .github/workflows/build-upload-deploy-prod.yml
  • .npmpackagejsonlintrc.json
  • .npmrc
  • .playwright-mcp/page-2026-03-31T13-15-48-291Z.yml
  • .playwright-mcp/page-2026-03-31T13-16-07-416Z.yml
  • README.md
  • dev-setup/README.md
  • dev-setup/run-reset.sh
  • dev-setup/run-setup.sh
  • knip.jsonc
  • package.json
  • playwright.config.ts
  • pnpm-workspace.yaml
  • scripts/dev-open.cjs
  • scripts/ensure-pnpm.cjs
  • scripts/quality.js
  • scripts/staging.sh
  • scripts/worktree/wt-add.sh
  • scripts/worktree/wt-common.sh
  • standalone/standalone-memes-mint/README.md
  • standalone/standalone-memes-mint/scripts/export-mint-page.cjs
💤 Files with no reviewable changes (2)
  • .ebextensions/npm.config
  • .npmrc

Comment thread .ebextensions/pnpm.config Outdated
Comment thread .github/workflows/build-upload-deploy-prod.yml Outdated
Comment thread .github/workflows/build-upload-deploy-prod.yml Outdated
Comment thread .playwright-mcp/page-2026-03-31T13-15-48-291Z.yml Outdated
Comment thread dev-setup/run-setup.sh
Comment thread package.json
Comment thread scripts/ensure-pnpm.cjs
Signed-off-by: Simo <simo@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-upload-deploy-prod.yml:
- Around line 37-40: Update the GitHub Actions step that uses actions/setup-node
by changing the action reference from actions/setup-node@v3 to
actions/setup-node@v6 and ensure the node-version value (currently "22") is set
to a supported runtime (e.g., "24" or a matrix) so the workflow uses the newer
runner; modify the block that contains uses: actions/setup-node@v3 and
node-version: "22" accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4470f834-2f3e-40b7-a9ed-0d00d19b03f1

📥 Commits

Reviewing files that changed from the base of the PR and between 543ab0c and 6ad10d3.

📒 Files selected for processing (6)
  • .ebextensions/pnpm.config
  • .github/workflows/build-upload-deploy-prod.yml
  • .gitignore
  • dev-setup/run-reset.sh
  • dev-setup/run-setup.sh
  • package.json
✅ Files skipped from review due to trivial changes (2)
  • .ebextensions/pnpm.config
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (3)
  • dev-setup/run-reset.sh
  • package.json
  • dev-setup/run-setup.sh

Comment thread .github/workflows/build-upload-deploy-prod.yml Outdated
simo6529 added 4 commits April 1, 2026 10:22
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 1, 2026

@simo6529 simo6529 merged commit 24e4a1a into main Apr 1, 2026
8 checks passed
@simo6529 simo6529 deleted the switch-pnpm branch April 1, 2026 11:32
This was referenced Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants